import request from '@/utils/request'

/* 学科列表 */
export const getSubList = params => {
  return request({
    method: 'GET',
    url: '/subjects',
    params
  })
}

/* 学科修改 */
export const editTag = (data) => {
  return request({
    method: 'PUT',
    url: `/tags/${data.id}`,
    data
  })
}

/* 单个标签状态修改 */
export const changeTagStatus = params => {
  return request({
    method: 'POST',
    url: '/tags/' + params
  })
}

/* 标签删除 */
export const deleteTag = id => {
  return request({
    method: 'DELETE',
    url: '/tags/' + id
  })
}

/* 添加标签 */
export const addTag = data => {
  return request({
    method: 'POST',
    url: '/tags',
    data
  })
}
